//按键事件
if(!(hasInterface || isDedicated))exitWith{};


as_onkeydo_camToUnit = objNull;


waitUntil{!(isNull(findDisplay 46))};

while{true}do{
	
	waitUntil{Sleep 1;!isNull as_onkeydo_camToUnit};
	
	as_onkeydo_id_0 = (findDisplay 46) displayAddEventHandler["KeyUp",{	
		params ["_displayorcontrol", "_key", "_shift", "_ctrl", "_alt"];
		if(_key == 38) then{
			[as_onkeydo_camToUnit, 0.2, 5, 4] spawn fn_camToUnit;
		};
	}];
	
	waitUntil{Sleep 1;isNull as_onkeydo_camToUnit};
	(findDisplay 46) displayRemoveEventHandler ["KeyUp", as_onkeydo_id_0];
};